﻿<Window x:Class="WpfMultimediaTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:WpfMultimediaTest.ViewModel"
        Title="Video Capture" 
        Height="350" 
        Width="525"
        WindowStartupLocation="CenterScreen"
        Background="Black">
    <Grid>
        <Image Source="{Binding Path=Frame.Frame}"/>
        <Border Background="#80000000" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Grid Margin="10">
                <Grid.Resources>
                    <Style TargetType="{x:Type TextBlock}">
                        <Setter Property="Foreground" Value="White"/>
                        <Setter Property="Margin" Value="2"/>
                    </Style>
                </Grid.Resources>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Resolution" HorizontalAlignment="Right"/>
                <TextBlock Grid.Column="1">
                    <TextBlock.Text>
                        <MultiBinding StringFormat="{}{0}x{1}">
                            <Binding Path="Width"/>
                            <Binding Path="Height"/>
                        </MultiBinding>
                    </TextBlock.Text>
                </TextBlock>
                <TextBlock Text="Time" HorizontalAlignment="Right" Grid.Row="1"/>
                <TextBlock Text="{Binding Path=Frame.TimeStamp, StringFormat='{}{0:HH:mm:ss}'}" Grid.Column="1" Grid.Row="1"/>
                <ToggleButton Grid.Row="2" Grid.ColumnSpan="2" IsChecked="{Binding Path=CanCapture}" Content="{Binding Path=DeviceName}"/>
            </Grid>
        </Border>
        
    </Grid>
</Window>
